﻿using Autofac;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WinFormWithAutofac
{
    internal static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            BootStrapper.BuildContainer();
            using (var scope= BootStrapper.AutoFacContainer.BeginLifetimeScope())
            {
                var form = scope.Resolve<Form1>();
                Application.Run(form);
            }
           
        }
    }
}
